package com.sl.core.domain.dto;

import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

@Getter
@Setter
public class TransformationInfoLogField {

    private List<TransformationInfoLogConfig> field;

    public static TransformationInfoLogField basicTranslogTable() {
        TransformationInfoLogField transformationInfoLogField = new TransformationInfoLogField();
        List<TransformationInfoLogConfig> transformationInfoLogConfigs = new ArrayList<>();
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("ID_BATCH", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("TRANSNAME", "Y"));

        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("STATUS", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_READ", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_WRITTEN", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_UPDATED", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_INPUT", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_OUTPUT", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_REJECTED", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("ERRORS", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("STARTDATE", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("ENDDATE", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LOGDATE", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("DEPDATE", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("REPLAYDATE", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LOG_FIELD", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("EXECUTING_SERVER", "N"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("EXECUTING_USER", "N"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("CLIENT", "N"));
        transformationInfoLogField.setField(transformationInfoLogConfigs);
        return transformationInfoLogField;
    }

    public static TransformationInfoLogField basicPerfLogTable() {
        TransformationInfoLogField transformationInfoLogField = new TransformationInfoLogField();
        List<TransformationInfoLogConfig> transformationInfoLogConfigs = new ArrayList<>();
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("ID_BATCH", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("SEQ_NR", "Y"));

        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LOGDATE", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("TRANSNAME", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("STEPNAME", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("STEP_COPY", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_READ", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_WRITTEN", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_UPDATED", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_INPUT", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_OUTPUT", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_REJECTED", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("ERRORS", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("INPUT_BUFFER_ROWS", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("OUTPUT_BUFFER_ROWS", "Y"));
        transformationInfoLogField.setField(transformationInfoLogConfigs);
        return transformationInfoLogField;
    }

    public static TransformationInfoLogField basicChannelLogTable() {

        TransformationInfoLogField transformationInfoLogField = new TransformationInfoLogField();
        List<TransformationInfoLogConfig> transformationInfoLogConfigs = new ArrayList<>();
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("ID_BATCH", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("CHANNEL_ID", "Y"));

        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LOG_DATE", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LOGGING_OBJECT_TYPE", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("OBJECT_NAME", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("OBJECT_COPY", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("REPOSITORY_DIRECTORY", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("FILENAME", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("OBJECT_ID", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("OBJECT_REVISION", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("PARENT_CHANNEL_ID", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("ROOT_CHANNEL_ID", "Y"));
        transformationInfoLogField.setField(transformationInfoLogConfigs);
        return transformationInfoLogField;
    }

    public static TransformationInfoLogField basicStepLogTable() {

        TransformationInfoLogField transformationInfoLogField = new TransformationInfoLogField();
        List<TransformationInfoLogConfig> transformationInfoLogConfigs = new ArrayList<>();
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("ID_BATCH", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("CHANNEL_ID", "Y"));

        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LOG_DATE", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("TRANSNAME", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("STEPNAME", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("STEP_COPY", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_READ", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_WRITTEN", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_UPDATED", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_INPUT", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_OUTPUT", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LINES_REJECTED", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("ERRORS", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LOG_FIELD", "Y"));
        transformationInfoLogField.setField(transformationInfoLogConfigs);
        return transformationInfoLogField;

    }

    public static TransformationInfoLogField basicMetricsLogTable() {


        TransformationInfoLogField transformationInfoLogField = new TransformationInfoLogField();
        List<TransformationInfoLogConfig> transformationInfoLogConfigs = new ArrayList<>();
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("ID_BATCH", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("CHANNEL_ID", "Y"));

        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("LOG_DATE", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("METRICS_DATE", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("METRICS_CODE", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("METRICS_DESCRIPTION", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("METRICS_SUBJECT", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("METRICS_TYPE", "Y"));
        transformationInfoLogConfigs.add(TransformationInfoLogConfig.basic("METRICS_VALUE", "Y"));
        transformationInfoLogField.setField(transformationInfoLogConfigs);
        return transformationInfoLogField;
    }
}
